﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data;
using System.Data.SqlClient;

namespace CapaDatos
{
    public class Conexion
    {
        #region singleton
        private static Conexion _instancia = new Conexion();
        public static Conexion Instancia
        {
            get { return Conexion._instancia; }
        }
        #endregion

        #region metodos
        public SqlConnection Conectar()
        {
            SqlConnection conexion = new SqlConnection();
            //conexion.ConnectionString = "Data Source=.; Initial Catalog=DBHotel; Integrated Security=true";
            //conexion.ConnectionString = "Data Source=.; Initial Catalog=DBHotel_DIARS; User ID=sa; Password=12345678";
            //conexion.ConnectionString = "workstation id=DBHotel.mssql.somee.com;packet size=4096;user id=testing2015_SQLLogin_1;pwd=h5whnt8uf7;data source=DBHotel.mssql.somee.com;persist security info=False;initial catalog=DBHotel";
            conexion.ConnectionString = "Data Source=SQL5014.Smarterasp.net;Initial Catalog=DB_9BB8ED_DBHotel;User Id=DB_9BB8ED_DBHotel_admin;Password=stwlaurence3;";
            return conexion;
        }
        #endregion
    }
}
